<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串</title>
</head>

<body>
    <?php
    /**
     * 字符串
     */
    //.：并置，即连接（可理解为js的+号）
    $str = '中文占4个字符' . "<br>";

    //长度
    echo strlen($str) . "<br>";

    //查找
    echo strpos($str, '字符');
    ?>
</body>

</html>